// -----------------------------------------------------------------------
//  <copyright file="DependsOnModulesAttribute.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2022 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2022-11-05 11:53</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Builder;

/// <summary>
/// 定义模块依赖，从启动模块开始，各个模块按照依赖关系形成一个模块树
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class DependsOnModulesAttribute : Attribute
{
    /// <summary>
    /// 初始化一个<see cref="DependsOnModulesAttribute"/>类型的新实例
    /// </summary>
    public DependsOnModulesAttribute(params Type[] dependedModuleTypes)
    {
        DependedModuleTypes = dependedModuleTypes;
    }

    /// <summary>
    /// 获取 当前模块的依赖模块类型集合
    /// </summary>
    public Type[] DependedModuleTypes { get; }
}
